import Tools from 'tools/index';
import apiConfig from "./../apiConfig";
export default {
    // 选择地址
    async SelectDeliverArea(params_) {
        if (!this.isError(params_)) return
        // 打开加载遮罩层
        Tools.setLoad(true);
        let _d = await import("./index.js");

        if (!params_.list) {
            params_.list = {}
        }

        if (!params_.level) {
            params_.level = 4
        }

        if (!params_.disable) {
            params_.disable = {}
        }

        // 关闭加载遮罩层
        Tools.setLoad(false);
        _d.default.init({
            appWindow: params_.appWindow,
            list: params_.list,
            disable: params_.disable,
            level: params_.level,
            apiConfig: this.setConfig(params_.apiConfig, apiConfig),
            onSuccess: (r) => {
                params_.onSuccess(r)
            },
        })
    },
}